package designPattern.singleton;

/**
 * Created by cdxuhongya on 2017/1/6.
 */
public class Singleton_sync_B {
    private static Singleton_sync_B instance = null;

    private Singleton_sync_B(){}

    public static Singleton_sync_B getInstance(){
        if(instance == null){
            synchronized (instance){
                instance = new Singleton_sync_B();
            }
        }
        return instance;
    }
}
